package com.brtbeacon.demo.lot.entity;

import android.os.Parcel;
import android.os.Parcelable;

public class ParkingParams implements Parcelable {

    public static final int NAV_MODE_WALK = 0;
    public static final int NAV_MODE_CAR = 1;

    private String buildingId;
    private String appkey;
    private int navMode;
    private boolean customLocation;
    private String targetPoiName;

    private float forwardDistanceDriving = 8.0f;
    private float forwardDistanceWalking = 0.0f;
    private float forwardDistanceSpeakDriving = 8.0f;
    private float forwardDistanceSpeakWalking = 3.0f;
    private float distanceToEndDriving = 4.0f;
    private float distanceToEndWalking = 4.0f;
    private float distanceToReplanRoute = 13.5f;
    private float zoomLevelDefault = 0.0f;
    private float zoomLevelNavigation = 0.0f;
    private boolean showActualLocation = false; //  显示定位引擎返回位置
    private boolean showLocationBeacons = false; // 显示周边定位Beacons信息

    public String getBuildingId() {
        return buildingId;
    }

    public void setBuildingId(String buildingId) {
        this.buildingId = buildingId;
    }

    public String getAppkey() {
        return appkey;
    }

    public void setAppkey(String appkey) {
        this.appkey = appkey;
    }

    public int getNavMode() {
        return navMode;
    }

    public void setNavMode(int navMode) {
        this.navMode = navMode;
    }

    public boolean isCustomLocation() {
        return customLocation;
    }

    public void setCustomLocation(boolean customLocation) {
        this.customLocation = customLocation;
    }

    public String getTargetPoiName() {
        return targetPoiName;
    }

    public void setTargetPoiName(String targetPoiName) {
        this.targetPoiName = targetPoiName;
    }


    public float getForwardDistanceDriving() {
        return forwardDistanceDriving;
    }

    public void setForwardDistanceDriving(float forwardDistanceDriving) {
        this.forwardDistanceDriving = forwardDistanceDriving;
    }

    public float getForwardDistanceWalking() {
        return forwardDistanceWalking;
    }

    public void setForwardDistanceWalking(float forwardDistanceWalking) {
        this.forwardDistanceWalking = forwardDistanceWalking;
    }

    public float getForwardDistanceSpeakDriving() {
        return forwardDistanceSpeakDriving;
    }

    public void setForwardDistanceSpeakDriving(float forwardDistanceSpeakDriving) {
        this.forwardDistanceSpeakDriving = forwardDistanceSpeakDriving;
    }

    public float getForwardDistanceSpeakWalking() {
        return forwardDistanceSpeakWalking;
    }

    public void setForwardDistanceSpeakWalking(float forwardDistanceSpeakWalking) {
        this.forwardDistanceSpeakWalking = forwardDistanceSpeakWalking;
    }

    public float getDistanceToEndDriving() {
        return distanceToEndDriving;
    }

    public void setDistanceToEndDriving(float distanceToEndDriving) {
        this.distanceToEndDriving = distanceToEndDriving;
    }

    public float getDistanceToEndWalking() {
        return distanceToEndWalking;
    }

    public void setDistanceToEndWalking(float distanceToEndWalking) {
        this.distanceToEndWalking = distanceToEndWalking;
    }

    public float getDistanceToReplanRoute() {
        return distanceToReplanRoute;
    }

    public void setDistanceToReplanRoute(float distanceToReplanRoute) {
        this.distanceToReplanRoute = distanceToReplanRoute;
    }

    public float getZoomLevelDefault() {
        return zoomLevelDefault;
    }

    public void setZoomLevelDefault(float zoomLevelDefault) {
        this.zoomLevelDefault = zoomLevelDefault;
    }

    public float getZoomLevelNavigation() {
        return zoomLevelNavigation;
    }

    public void setZoomLevelNavigation(float zoomLevelNavigation) {
        this.zoomLevelNavigation = zoomLevelNavigation;
    }

    public boolean isShowActualLocation() {
        return showActualLocation;
    }

    public void setShowActualLocation(boolean showActualLocation) {
        this.showActualLocation = showActualLocation;
    }

    public boolean isShowLocationBeacons() {
        return showLocationBeacons;
    }

    public void setShowLocationBeacons(boolean showLocationBeacons) {
        this.showLocationBeacons = showLocationBeacons;
    }

    public ParkingParams() {
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.buildingId);
        dest.writeString(this.appkey);
        dest.writeInt(this.navMode);
        dest.writeByte(this.customLocation ? (byte) 1 : (byte) 0);
        dest.writeString(this.targetPoiName);
        dest.writeFloat(this.forwardDistanceDriving);
        dest.writeFloat(this.forwardDistanceWalking);
        dest.writeFloat(this.forwardDistanceSpeakDriving);
        dest.writeFloat(this.forwardDistanceSpeakWalking);
        dest.writeFloat(this.distanceToEndDriving);
        dest.writeFloat(this.distanceToEndWalking);
        dest.writeFloat(this.distanceToReplanRoute);
        dest.writeFloat(this.zoomLevelDefault);
        dest.writeFloat(this.zoomLevelNavigation);
        dest.writeByte(this.showActualLocation ? (byte) 1 : (byte) 0);
        dest.writeByte(this.showLocationBeacons ? (byte) 1 : (byte) 0);
    }

    protected ParkingParams(Parcel in) {
        this.buildingId = in.readString();
        this.appkey = in.readString();
        this.navMode = in.readInt();
        this.customLocation = in.readByte() != 0;
        this.targetPoiName = in.readString();
        this.forwardDistanceDriving = in.readFloat();
        this.forwardDistanceWalking = in.readFloat();
        this.forwardDistanceSpeakDriving = in.readFloat();
        this.forwardDistanceSpeakWalking = in.readFloat();
        this.distanceToEndDriving = in.readFloat();
        this.distanceToEndWalking = in.readFloat();
        this.distanceToReplanRoute = in.readFloat();
        this.zoomLevelDefault = in.readFloat();
        this.zoomLevelNavigation = in.readFloat();
        this.showActualLocation = in.readByte() != 0;
        this.showLocationBeacons = in.readByte() != 0;
    }

    public static final Creator<ParkingParams> CREATOR = new Creator<ParkingParams>() {
        @Override
        public ParkingParams createFromParcel(Parcel source) {
            return new ParkingParams(source);
        }

        @Override
        public ParkingParams[] newArray(int size) {
            return new ParkingParams[size];
        }
    };
}
